package components.tools.correction
{
	import UIFree.ObjectEvent;
	import UIFree.uif_ecomponent;
	
	import classes.clt_events;
	
	import components.uif_center100;
	
	import flash.events.Event;

	public class clt_standartCorr extends clt_correctionBasePanel {
		private var _sb_brigth: uif_center100;
		private var _sb_cont: uif_center100;
		public function clt_standartCorr(parent: uif_ecomponent, ax:int=0, ay:int=0, awidth:int=0, aheight:int=0)	{
			super(parent, ax, ay, awidth, aheight);
			parent.addEvent(clt_events.CLEAR, doClear);
		}

		protected function doClear(e: Event): void {
			_sb_brigth.value 	= 0;
			_sb_cont.value 		= 0;
		}
		
		override protected function createComponents(): void {
			_sb_brigth 	= createScroll('Яркость', 'scrollbar');
			_sb_cont	= createScroll('Контраст', 'scrollbar');
		}

		override protected function doUpdate(e: Event): void {
			clt.workspace.dispatchEvent(new ObjectEvent(clt_events.STANDARTCORR, [
				_sb_brigth.value,
				_sb_cont.value,
			]));
		}
	}
}